<?php
$query=$_SERVER['QUERY_STRING'];
parse_str($query,$queryResult);
$userName=$queryResult['userName'];
$user=$queryResult['user'];

$allUser=parse_ini_file('./user.ini');

function isExist($userName, $allUser)
{
    foreach ($allUser as $userNamei => $useri)
    {
        if($userNamei===$userName)
            return true;
    }
    return false;
}

if(!isExist($userName,$allUser))
{
    $allUser[$userName]=$user;
    require 'key.php';
    write_ini_file('./user.ini',$allUser);
    echo 'success';
}